package com.rerun.entity;


import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rerun.common.util.JsonDateFormat;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.Date;

/**
 * @author dax.
 * @version v1.0
 * @since 2017/10/31 9:29
 */
@TableName("chat_user")
@Repository
public class ChatUser extends Model<ChatUser> {

    private static final long serialVersionUID = 5533338491781196258L;
    @TableId(type = IdType.UUID)
    private String chatUserId;
    private String memberId;
    private String userName;
    private String uPassword;
    private long parkId;
    @JsonSerialize(using = JsonDateFormat.class)
    private Date createTime;
    @JsonSerialize(using = JsonDateFormat.class)
    private  Date updateTime;

    public String getChatUserId() {
        return chatUserId;
    }

    public void setChatUserId(String chatUserId) {
        this.chatUserId = chatUserId;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getuPassword() {
        return uPassword;
    }

    public void setuPassword(String uPassword) {
        this.uPassword = uPassword;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public long getParkId() {
        return parkId;
    }

    public void setParkId(long parkId) {
        this.parkId = parkId;
    }

    @Override
    public String toString() {
        return "{" +
                "chatUserId:" + chatUserId +
                ", memberId:" + memberId +
                ", userName:" + userName +
                ", uPassword:" + uPassword +
                ", parkId:" + parkId +
                ", createTime:" + createTime +
                ", updateTime:" + updateTime +
                '}';
    }

    @Override
    protected Serializable pkVal() {
        return chatUserId;
    }
}
